<?php

namespace app\model;

class CommentModel extends BaseModel
{
    protected $table = 'comment';

    public function user()
    {
        return $this->belongsTo(UsersModel::class, 'user_id');
    }

    public function replyUser()
    {
        return $this->belongsTo(UsersModel::class, 'reply_user_id');
    }

    public function post()
    {
        return $this->belongsTo(PostModel::class, 'post_id');
    }
}